package com.hmall.search.service;

import com.hmall.common.dto.PageDTO;
import com.hmall.search.pojo.ItemDoc;
import com.hmall.search.pojo.RequestParams;

import java.util.List;
import java.util.Map;

public interface SearchService {
    // batch insert


    /**
     * 搜索框自动补全
     *
     * @param prefix
     * @return
     */
    List<String> suggest(String prefix);

    /**
     * 输入框搜索
     *
     * @param requestParams
     * @return
     */
    PageDTO<ItemDoc> list(RequestParams requestParams);


    /**
     * 过滤项聚合功能
     *
     * @param requestParams
     * @return
     */
    Map<String, List<String>> aggregation(RequestParams requestParams);
}
